<template>
  <transition name="el-zoom-in-center">
    <div class="JNPF-common-layout" >
      <div class="JNPF-preview-main">
        <el-page-header @back="goBack" content="资产列表"/>

        <el-col :span="24">
          <el-row :gutter="10">
            <!--            <el-col :span="24" style="display: flex">-->
            <!--              <div style="display: flex;right: 0px;position: absolute;margin-top: 10px">-->
            <!--                <jnpf-button-->
            <!--                  style="width: 120px"-->
            <!--                  align="right" buttonText="合同续签" type="primary" :closable="false"-->
            <!--                >-->
            <!--                </jnpf-button>-->
            <!--                <jnpf-button style="width: 120px" @click="billCollection()"-->
            <!--                             align="right" buttonText="合同变更" type="primary" :closable="false"-->
            <!--                >-->
            <!--                </jnpf-button>-->

            <!--                <jnpf-button style="width: 120px" @click="toBllReduce()"-->
            <!--                             align="right" buttonText="合同终止" type="primary" :closable="false"-->
            <!--                >-->
            <!--                </jnpf-button>-->
            <!--                <jnpf-button style="width: 120px" @click="toBillRefund()"-->
            <!--                             align="right" buttonText="合同套打" type="primary" :closable="false"-->
            <!--                >-->
            <!--                </jnpf-button>-->

            <!--              </div>-->
            <!--            </el-col>-->
          </el-row>
        </el-col>
        <el-col :span="24">
          <el-col :span="5">
            <el-card style="height: 90vh;margin-top: 10px">
              <el-row :gutter="10" class=" main" :style="{margin: '0 auto',width: '95%'}">
                <el-form ref="elForm" v-loading="listLoading" :model="dataForm" size="small" label-width="180px"
                         label-position="right">

                  <el-col :span="24">
                    <el-card shadow="hover" style="margin: 1px; border-radius: 8px;">
                      <el-row :gutter="20">
                        <el-col :span="24" style="margin-bottom: 15px;margin-top: 1px">
                          <div style="text-align: left;margin-left:17px">
                            <p style="font-size: 18px; font-weight: bold; color: #409EFF; margin: 0;">{{ dataForm.zcNumber }}</p>
                          </div>
                        </el-col>

                        <el-col :span="24" style="margin-bottom: 10px;">
                          <div style="display: flex; align-items: center;margin-top: 10px">
                            <i class="el-icon-location-outline" style="margin-right: 5px; color: #F56C6C;"></i>
                            <span style="font-size: 14px;">详细地址：{{ dataForm.address }}</span>
                          </div>
                        </el-col>

                        <el-col :span="24" style="margin-bottom: 10px;">
                          <div style="display: flex; align-items: center;margin-top: 10px">
                            <i class="el-icon-document" style="margin-right: 5px; color: #67C23A;"></i>
                            <span style="font-size: 14px;">权证号：{{ dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber }}</span>
                          </div>
                        </el-col>

                        <el-col :span="24" style="margin-bottom: 15px;">
                          <div style="display: flex; align-items: center;margin-top: 10px">
                            <i class="el-icon-office-building" style="margin-right: 5px; color: #E6A23C;"></i>
                            <span style="font-size: 14px;">权属单位：{{ dataForm.affiliatedUnit }}</span>
                          </div>
                        </el-col>

                        <el-col :span="12">
                          <el-form-item label="资产状态:" label-width="90px" style="margin-bottom: 10px;">
                            <el-tag
                              :type="getStatusTagType(dataForm.status)"
                              effect="light"
                              style="font-weight: bold;">

                              {{ getStatusText(dataForm.status) }}
                            </el-tag>
                          </el-form-item>
                        </el-col>

                        <el-col :span="24">
                          <el-form-item label="资产备注:" label-width="90px" style="margin-bottom: 10px;">
                            <p style="font-size: 14px; color: #909399; margin: 0;">
                              {{ dataForm.notes || '暂无备注' }}
                            </p>
                          </el-form-item>
                        </el-col>
                      </el-row>
                    </el-card>
                  </el-col>
                </el-form>
              </el-row>
            </el-card>
          </el-col>
          <el-col :span="18" style="margin-left:30px">
            <el-tabs v-model="active" @tab-click="handleClick">
              <el-tab-pane label="基础信息" name="0"></el-tab-pane>
              <el-tab-pane label="权证信息" name="1"></el-tab-pane>
              <el-tab-pane label="面积及可租信息" name="2"></el-tab-pane>
              <el-tab-pane label="资产近照" name="3"></el-tab-pane>
              <el-tab-pane label="资产评估" name="4"></el-tab-pane>
            </el-tabs>
            <el-row :gutter="1" style="margin-top: 1px">
              <el-form ref="elForm" v-loading="listLoading" :model="dataForm" :rules="dataRule" size="medium"
                       label-width="160px"
                       label-position="right"
                       :disabled="setting.readonly"
              >

                <div v-show="active == 0">
                  <el-row>
                    <el-col :span="24" v-if="!setting.readonly"
                    >
                      <el-form-item label="流程标题"
                                    prop="title"
                      >
                        <el-input v-model="dataForm.title" v-if="!setting.readonly"
                                  placeholder="请输入" clearable :style='{"width":"100%"}'
                        >
                        </el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('zcLabel')"
                    >
                      <el-form-item label="资产类别"
                                    prop="assetClass"
                      >
                        <el-select v-model="dataForm.assetClass" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('assetClass')" clearable :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in assetClassOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>
                        </el-select>
                        <span class="value"
                              v-if="setting.readonly">{{ getOptionLabel(assetClassOptions, dataForm.assetClass) || '-' }}</span>
                      </el-form-item>
                    </el-col>


                    <el-col :span="8" v-if="judgeShow('zcType')"
                    >
                      <el-form-item label="资产类型"
                                    prop="zcType"
                      >
                        <el-select v-model="dataForm.zcType" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('zcType')" clearable :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in assetTypeOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>
                        </el-select>
                        <span class="value"
                              v-if="setting.readonly">{{ getOptionLabel(assetTypeOptions, dataForm.zcType) || '-' }}</span>
                      </el-form-item>
                    </el-col>




                    <el-col :span="8" v-if="judgeShow('zcNumber')"
                    >
                      <el-form-item label="资产编号"
                                    prop="zcNumber"
                      >
                        <el-input v-model="dataForm.zcNumber" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('zcNumber')" clearable :style='{"width":"100%"}'
                        >
                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.zcNumber || '-' }}</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('zcName')"
                    >
                      <el-form-item label="资产名称"
                                    prop="zcName"
                      >
                        <el-input v-model="dataForm.zcName" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('zcName')" clearable :style='{"width":"100%"}'
                        >
                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.zcName || '-' }}</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('address')"
                    >
                      <el-form-item label="所属项目"
                                    prop="belongingProject"
                      >
                        <el-input v-model="dataForm.belongingProject" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('belongingProject')" clearable
                                  :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.belongingProject || '-' }}</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('address')"
                    >
                      <el-form-item label="所属楼栋"
                                    prop="belongingBuilding"
                      >
                        <el-input v-model="dataForm.belongingBuilding" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('belongingBuilding')" clearable
                                  :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.belongingBuilding || '-' }}</span>
                      </el-form-item>
                    </el-col>
                  </el-row>

                  <el-row>
                    <el-col :span="8" v-if="judgeShow('address')">
                      <el-form-item label="区域" prop="address">
                        <div class="address-selector">
                          <div class="select-group" v-if="!setting.readonly">
                            <div class="select-wrapper">

                              <select v-model="selectedProvince" @change="onProvinceChange">
                                <option value="">请选择省份</option>
                                <option v-for="province in provinces" :value="province.adcode">{{ province.name }}</option>
                              </select>
                            </div>

                            <div class="select-wrapper">
                              <select v-model="selectedCity" @change="onCityChange" :disabled="!cities.length">
                                <option value="">请选择城市</option>
                                <option v-for="city in cities" :value="city.adcode">{{ city.name }}</option>
                              </select>
                            </div>

                            <div class="select-wrapper">
                              <select v-model="selectedDistrict" @change="onDistrictChange" :disabled="!districts.length">
                                <option value="">请选择区县</option>
                                <option v-for="district in districts" :value="district.adcode">{{ district.name }}</option>
                              </select>
                            </div>

                            <div class="select-wrapper">
                              <select v-model="selectedStreet" @change="onStreetChange" :disabled="!streets.length">
                                <option value="">请选择街道</option>
                                <option v-for="street in streets" :value="street.adcode">{{ street.name }}</option>
                              </select>
                            </div>
                          </div>

                          <!--                <div v-if="loadingCity" class="loading">加载城市数据中...</div>-->
                          <!--                <div v-if="loadingDistrict" class="loading">加载区县数据中...</div>-->
                          <!--                <div v-if="loadingStreet" class="loading">加载街道数据中...</div>-->
<!--                          v-if="selectedStreet"-->


                        <div class="result"  v-if="setting.readonly">
                                            <p>{{ dataForm.provinceName }} {{ dataForm.cityName }} {{ dataForm.districtName }} {{ dataForm.streetName }}</p>
<!--                <p>编码: {{ selectedProvince }}-{{ selectedCity }}-{{ selectedDistrict }}-{{ selectedStreet }}</p>-->
                        </div>
                        </div>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('address')">


                      <el-form-item label="坐落位置" prop="address">
                        <div v-if="!setting.readonly">
                          <el-input v-model="dataForm.address" :disabled="judgeWrite('address')" clearable
                                    :style='{"width":"100%"}'></el-input>
                          <el-button @click="openDialog">选择位置</el-button>
                          <span class="value" v-if="!setting.readonly && dataForm.longitude" style="color:grey;font-size:12px" >(经度：{{dataForm.longitude}},维度：{{dataForm.latitude}})</span>
                        </div>
                        <span class="value" v-if="setting.readonly">{{ dataForm.address || '-' }}{{dataForm.longitude}},{{dataForm.latitude}}</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('address')"
                    >
                      <el-form-item label="资产使用情况"
                                    prop="zcStatus"
                      >
                        <el-select v-model="dataForm.zcStatus" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('zcStatus')" clearable :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in zcStatusOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>

                        </el-select>
                        <span class="value" v-if="setting.readonly">{{
                            getOptionLabel(zcStatusOptions, dataForm.zcStatus) || '-'
                          }}</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('zcPurpose')"
                    >
                      <el-form-item label="资产用途"
                                    prop="zcPurpose"
                      >
                        <el-select v-model="dataForm.zcPurpose" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('zcPurpose')" clearable
                                   :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in zcPurposeOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>

                        </el-select>
                        <span class="value"
                              v-if="setting.readonly">{{ getOptionLabel(zcPurposeOptions, dataForm.zcPurpose) || '-' }}</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('zcPurposeDescribe') &&  dataForm.zcPurpose=='其他'"
                    >
                      <el-form-item label="其他用途说明"
                                    prop="zcPurposeDescribe"
                      >
                        <el-input v-model="dataForm.zcPurposeDescribe" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('zcPurposeDescribe')" clearable :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.zcPurposeDescribe || '-' }}</span>
                      </el-form-item>
                    </el-col>


                    <el-col :span="8" v-if="judgeShow('zcSource')"
                    >
                      <el-form-item label="资产来源"
                                    prop="zcSource"
                      >
                        <el-select v-model="dataForm.zcSource" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('zcSource')" clearable :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in zcSourceOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>

                        </el-select>
                        <span class="value" v-if="setting.readonly">{{
                            getOptionLabel(zcSourceOptions, dataForm.zcSource) || '-'
                          }}</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('zcSourceDescribe') &&  dataForm.zcSource  == '其它'"
                    >
                      <el-form-item label="其他资产来源说明"
                                    prop="zcPurposeDescribe"
                      >
                        <el-input v-model="dataForm.zcSourceDescribe" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('zcSourceDescribe')" clearable :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.zcSourceDescribe || '-' }}</span>
                      </el-form-item>
                    </el-col>







                    <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                    >
                      <el-form-item label="取得日期"
                                    prop="acquisitionDate"
                      >
                        <el-date-picker v-if="!setting.readonly" v-model="dataForm.acquisitionDate"
                                        placeholder="请选择" :disabled="judgeWrite('acquisitionDate')"
                                        clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                        >
                        </el-date-picker>

                        <span class="value" v-if="setting.readonly">{{ dataForm.acquisitionDate || '-' }}</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('address')"
                    >
                      <el-form-item label="取得价值(万元)"
                                    prop="acquiringValue"
                      >
                        <el-input v-model="dataForm.acquiringValue" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('acquiringValue')" clearable :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.acquiringValue || '-' }}</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('holdingMethod')"
                    >
                      <el-form-item label="持有方式"
                                    prop="holdingMethod"
                      >
                        <el-select v-model="dataForm.holdingMethod" v-if="!setting.readonly"
                                   placeholder="请选择" :disabled="judgeWrite('holdingMethod')" clearable :style='{"width":"100%"}'
                        >
                          <el-option v-for="(item, index) in holdingMethodOptions" :key="index" :label="item.fullName"
                                     :value="item.enCode" :disabled="item.disabled"
                          ></el-option>

                        </el-select>
                        <span class="value" v-if="setting.readonly">{{
                            getOptionLabel(holdingMethodOptions, dataForm.holdingMethod) || '-'
                          }}</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="8" v-if="judgeShow('clientFullName') && dataForm.holdingMethod!='自持'"
                    >
                      <el-form-item label="委托方全称"
                                    prop="clientFullName"
                      >
                        <el-input v-model="dataForm.clientFullName" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('clientFullName')" clearable :style='{"width":"100%"}'
                        >

                        </el-input>
                        <span class="value" v-if="setting.readonly">{{ dataForm.clientFullName }}</span>

                      </el-form-item>
                    </el-col>

                    <el-col :span="8" v-if="judgeShow('zcAdmin')"
                    >
                      <el-form-item label="资产管理员"
                                    prop="zcAdmin"
                      >
                        <user-select v-model="dataForm.zcAdmin" v-if="!setting.readonly"
                                     placeholder="请选择" :disabled="judgeWrite('zcAdmin')" clearable
                        >


                        </user-select>
                        <span class="value" v-if="setting.readonly">{{ dataForm.zcAdmin }}</span>

                      </el-form-item>
                    </el-col>
                    <!--            <el-col :span="8" v-if="judgeShow('managementUnit')"-->
                    <!--            >-->
                    <!--              <el-form-item label="管理单位"-->
                    <!--                            prop="managementUnit"-->
                    <!--              >-->
                    <!--                <el-select v-model="dataForm.managementUnit" v-if="!setting.readonly"-->
                    <!--                           placeholder="请选择" :disabled="judgeWrite('managementUnit')" clearable-->
                    <!--                           :style='{"width":"100%"}'-->
                    <!--                >-->
                    <!--                  <el-option v-for="(item, index) in managementUnitOptions" :key="index" :label="item.fullName"-->
                    <!--                             :value="item.enCode" :disabled="item.disabled"-->
                    <!--                  ></el-option>-->

                    <!--                </el-select>-->
                    <!--                <span class="value" v-if="setting.readonly">{{-->
                    <!--                    getOptionLabel(managementUnitOptions, dataForm.managementUnit) || '-'-->
                    <!--                  }}</span>-->

                    <!--              </el-form-item>-->
                    <!--            </el-col>-->

                    <el-col :span="8" v-if="judgeShow('managementUnit')">

                      <el-form-item label="管理单位" prop="managementUnit">
                        <el-input
                          v-model="dataForm.managementUnit"
                          v-if="!setting.readonly"
                          placeholder="请输入"
                          :disabled="judgeWrite('managementUnit')"
                          clearable
                          :style="{ 'width': '100%' }"
                        ></el-input>
                        <span class="value notes" v-if="setting.readonly">{{ dataForm.managementUnit || '-' }}</span>
                      </el-form-item>


                    </el-col>

                    <el-col :span="14" v-if="judgeShow('notes')"
                    >
                      <el-form-item label="备注"
                                    prop="notes"
                      >
                        <el-input v-model="dataForm.notes" v-if="!setting.readonly"
                                  placeholder="请输入" :disabled="judgeWrite('notes')" :style='{"width":"100%"}' true
                                  type="textarea" :autosize='{"minRows":4,"maxRows":4}'
                        >

                        </el-input>
                        <span class="value notes" v-if="setting.readonly">{{ dataForm.notes || '-' }}</span>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-col :span="6" v-if="judgeShow('zcFile')"
                  >
                    <el-form-item label="资产附件"
                                  prop="zcFile"
                    >
                      <JNPF-UploadFz v-model="dataForm.zcFile"
                                     :fileSize="10" :disabled="judgeWrite('zcFile')" sizeUnit="MB" :limit="9"
                                     buttonText="点击上传"
                      >

                      </JNPF-UploadFz>
                    </el-form-item>
                  </el-col>
                </div>
                <div v-show="active == 1">
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_useNature')"
                  >
                    <el-form-item label="产权类别"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_useNature"
                    >
                      <el-select v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_useNature')"
                                 clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions" :key="index"
                                   :label="item.fullName" :value="item.enCode" :disabled="item.disabled"
                        ></el-option>
                      </el-select>

                      <span class="value" v-if="setting.readonly">{{
                          getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions, dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature) || '-'
                        }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation') && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="权证单位"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation"
                    >
                      <el-input v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation')"
                                clearable :style='{"width":"100%"}'
                      >
                      </el-input>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation || '-'
                        }}</span>

                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="产权证号"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber"
                    >
                      <el-input v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber')"
                                clearable :style='{"width":"100%"}'
                      >
                      </el-input>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber
                        }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="权利性质"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
                    >
                      <el-select v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight"
                                 placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_propertyRight')"
                                 clearable :style='{"width":"100%"}' v-if="!setting.readonly"
                      >
                        <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions" :key="index"
                                   :label="item.fullName" :value="item.enCode" :disabled="item.disabled"
                        ></el-option>

                      </el-select>

                      <span class="value" v-if="setting.readonly"> {{
                          getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions, dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight) || '-'
                        }}</span>

                    </el-form-item>
                  </el-col>


                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight == 'cqxzqt'"
                  >
                    <el-form-item label="其他权利性质说明"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe"
                    >
                      <el-input v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe')"
                                clearable :style='{"width":"100%"}'
                      >
                      </el-input>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe
                        }}</span>
                    </el-form-item>
                  </el-col>












                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantType')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="权利类型"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantType"
                    >
                      <el-select v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantType" v-if="!setting.readonly"
                                 placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantType')"
                                 clearable :style='{"width":"100%"}'
                      >
                        <el-option v-for="(item, index) in jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions" :key="index"
                                   :label="item.fullName" :value="item.enCode" :disabled="item.disabled"
                        ></el-option>
                      </el-select>

                      <span class="value" v-if="setting.readonly">{{
                          getOptionLabel(jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions, dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantType) || '-'
                        }}</span>
                    </el-form-item>
                  </el-col>

                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantType == 'cclxqt'"
                  >
                    <el-form-item label="其他权利类型说明"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe"
                    >
                      <el-input v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe" v-if="!setting.readonly"
                                placeholder="请输入" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe')"
                                clearable :style='{"width":"100%"}'
                      >
                      </el-input>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe
                        }}</span>
                    </el-form-item>
                  </el-col>






                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="发证时间"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime"
                    >
                      <el-date-picker v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime" v-if="!setting.readonly"
                                      placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime')"
                                      clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                      >
                      </el-date-picker>

                      <span class="value" v-if="setting.readonly">{{ dataForm.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime }}</span>

                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_startTime')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="开始使用时间"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_startTime"
                    >
                      <el-date-picker v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_startTime" v-if="!setting.readonly"
                                      placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_startTime')"
                                      clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"

                      >
                      </el-date-picker>

                      <span class="value" v-if="setting.readonly">{{ dataForm.jnpf_zcgl_zcdj_warrant_jnpf_startTime }}</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_endTime')  && dataForm.jnpf_zcgl_zcdj_warrant_jnpf_useNature == 'yqs'"
                  >
                    <el-form-item label="使用到期时间"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_endTime"
                    >
                      <el-date-picker v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_endTime" v-if="!setting.readonly"
                                      placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_endTime')"
                                      clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"

                      >
                      </el-date-picker>

                      <span class="value" v-if="setting.readonly">{{ dataForm.jnpf_zcgl_zcdj_warrant_jnpf_endTime }}</span>
                    </el-form-item>
                  </el-col>


                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')"
                  >
                    <el-form-item label="产证附件"
                                  prop="jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
                    >
                      <JNPF-UploadFz v-model="dataForm.jnpf_zcgl_zcdj_warrant_jnpf_productionFile"
                                     :fileSize="10" :disabled="judgeWrite('jnpf_zcgl_zcdj_warrant_jnpf_productionFile')"
                                     sizeUnit="MB" :limit="9" buttonText="点击上传"
                      >
                      </JNPF-UploadFz>
                    </el-form-item>
                  </el-col>

                </div>
                <div  style="min-height: 350px" v-if="active== 2">
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingArea')"
                  >
                    <el-form-item label="证载建筑面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_buildingArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea"
                                       v-if="!setting.readonly"
                                       placeholder="数字文本"
                                       :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingArea')"
                                       :step="1"
                      >
                      </el-input-number>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingArea || '-'
                        }}㎡</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landArea')"
                  >
                    <el-form-item label="证载土地面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_landArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea" v-if="!setting.readonly"
                                       placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landArea')"
                                       :step="1"
                      >
                      </el-input-number>
                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_landArea || '-'
                        }}㎡</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')"
                  >
                    <el-form-item label="证载共有土地面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_sharedLandArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea"
                                       v-if="!setting.readonly"
                                       placeholder="数字文本"
                                       :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedLandArea')" :step="1"
                      >
                      </el-input-number>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea || '-'
                        }}㎡</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')"
                  >
                    <el-form-item label="建筑测量面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea"
                                       v-if="!setting.readonly"
                                       placeholder="数字文本"
                                       :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea')"
                                       :step="1"
                      >
                      </el-input-number>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea || '-'
                        }}㎡</span>
                    </el-form-item>
                  </el-col>
<!--                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')"-->
<!--                  >-->
<!--                    <el-form-item label="土地测量面积"-->
<!--                                  prop="jnpf_zcgl_zcdj_area_jnpf_landSurveyArea"-->
<!--                    >-->
<!--                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea"-->
<!--                                       v-if="!setting.readonly"-->
<!--                                       placeholder="数字文本"-->
<!--                                       :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_landSurveyArea')" :step="1"-->
<!--                      >-->
<!--                      </el-input-number>-->

<!--                      <span class="value" v-if="setting.readonly">{{-->
<!--                          dataForm.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea || '-'-->
<!--                        }}㎡</span>-->
<!--                    </el-form-item>-->
<!--                  </el-col>-->
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')"
                  >
                    <el-form-item label="独用面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea"
                                       v-if="!setting.readonly"
                                       placeholder="数字文本"
                                       :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_exclusiveArea')"
                                       :step="1"
                      >
                      </el-input-number>

                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea || '-'
                        }}㎡</span>
                    </el-form-item>
                  </el-col>
                  <el-col :span="6" v-if="judgeShow('jnpf_zcgl_zcdj_area_jnpf_sharedArea')"
                  >
                    <el-form-item label="分摊面积"
                                  prop="jnpf_zcgl_zcdj_area_jnpf_sharedArea"
                    >
                      <el-input-number v-model=" dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea" v-if="!setting.readonly"
                                       placeholder="数字文本" :disabled="judgeWrite('jnpf_zcgl_zcdj_area_jnpf_sharedArea')"
                                       :step="1"
                      >
                      </el-input-number>
                      <span class="value" v-if="setting.readonly">{{
                          dataForm.jnpf_zcgl_zcdj_area_jnpf_sharedArea || '-'
                        }}㎡</span>

                    </el-form-item>
                  </el-col>
                </div>


                <div  style="min-height: 350px" v-if="active==3">
                  <el-col :span="8" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                  >
                    <el-form-item label="近照日期"
                                  prop="jnpf_zcgl_zcdj_photo_jnpf_photoTime"
                    >
                      <el-date-picker v-model=" dataForm.jnpf_zcgl_zcdj_photo_jnpf_photoTime"
                                      placeholder="请选择" :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoTime')"
                                      clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
                                      value-format="timestamp"
                      >
                      </el-date-picker>
                    </el-form-item>
                  </el-col>
                  <el-col :span="24" v-if="judgeShow('jnpf_zcgl_zcdj_photo_jnpf_photoImage')"
                  >
                    <el-form-item label="近照图片"
                                  prop="jnpf_zcgl_zcdj_photo_jnpf_photoImage"
                    >
                      <JNPF-UploadImg v-model=" dataForm.jnpf_zcgl_zcdj_photo_jnpf_photoImage"
                                      :fileSize="10" :disabled="judgeWrite('jnpf_zcgl_zcdj_photo_jnpf_photoImage')"
                                      sizeUnit="MB" :limit="9"
                      >
                      </JNPF-UploadImg>
                    </el-form-item>
                  </el-col>
                  <el-col :span="24">
                    <el-form-item label-width="0">
                      <JNPF-Text :style='{"width":"100%"}'
                                 :textStyle='{"color":"#CCAEAE","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'
                                 value="注:最多上传五张图片,单张图片最大支持10M、支持png/jpg/jpeg/gif格式" :closable="false"
                      >
                      </JNPF-Text>
                    </el-form-item>
                  </el-col>
                </div>


                <div v-if="active==4">

                  <el-table  :data="zcpglist"
                            style="height: 100%;">
                    <el-table-column label="资产名称" prop="assetName" algin="left"
                    >
                      <template slot-scope="scope">
                        {{ scope.row.assetName | dynamicText(assetNameOptions) }}
                      </template>
                    </el-table-column>
                    <el-table-column prop="valuationDate_name" label="评估基准日" align="left"
                    />
                    <el-table-column prop="evaluationDate_name" label="评估报告日" align="left"
                    />
                    <el-table-column prop="evaluationAgency_name" label="评估机构" align="left"
                    />
                    <el-table-column prop="evaluateValue_name" label="评估公允总价值" align="left"
                    />
                    <el-table-column prop="evaluationUnit_name" label="公允单位" align="left"
                    />
                    <el-table-column prop="evaluateMarketRent_name" label="公允市场租金" align="left"
                    />
                    <el-table-column prop="notes_name" label="备注" align="left"
                    />

                  </el-table>


                </div>

                <div id="container"></div>

              </el-form>
            </el-row>
          </el-col>

        </el-col>

        <UserBox v-if="userBoxVisible" ref="userBox" @submit="submit"/>
        <!-- 固定在底部的按钮列 -->
        <!--        <div class="fixed-bottom">-->
        <!--          <button @click="nextS" class="confirm-button">上一步</button>-->
        <!--          <button @click="next" class="confirm-button">下一步</button>-->

        <!--        </div>-->
      </div>
    </div>


  </transition>
</template>
<script>
import request from '@/utils/request'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import axios from 'axios'


export default {
  components: {},
  props: [],
  data() {
    return {
      zcpglist:[],

      // 当前选择的值
      selectedProvince: '',
      selectedCity: '',
      selectedDistrict: '',
      selectedStreet: '',

      // 数据加载状态
      loadingCity: false,
      loadingDistrict: false,
      loadingStreet: false,

      // 下拉选项数据
      provinces: [],
      cities: [],
      districts: [],
      streets: [],



      map: null,
      marker: null,
      active: 0,
      visible: false,
      loading: false,
      setting: {},
      eventType: '',
      userBoxVisible: false,
      currTableConf: {},
      addTableConf: {},
      tableRows: {},
      dataForm: {
        id: '',
        flowId: '',
        status: 1,
        freeapproveruserid: '',
        flowUrgent: 1,
        zcNumber: undefined,
        zcName: undefined,
        zcLabel: undefined,
        address: undefined,
        zcNature: undefined,
        zcPurpose: undefined,
        zcSource: undefined,
        affiliatedUnit: undefined,
        managementUnit: undefined,
        zcAdmin: undefined,
        notes: undefined,
        zcFmImage: [],
        zcFile: [],
        zcgl_zcdj_area:
          {
            buildingArea: '',
            landArea: '',
            sharedLandArea: '',
            buildingMeasurementArea: '',
            landSurveyArea: '',
            exclusiveArea: '',
            sharedArea: ''
          },
        zcgl_zcdj_warrant:
          {
            propertyRight: '',
            warrantNumber: '',
            landUse: '',
            housePurpose: '',
            zzPropertyOwner: '',
            xzPropertyOwner: '',
            address: '',
            useNature: '',
            buildings: '',
            layers: '',
            numberFloors: '',
            startTime: '',
            endTime: '',
            issuanceTime: '',
            custodyLocation: '',
            notes: '',
            productionFile: '',
            productionImage: ''
          },
        zcgl_zcdj_photo:
          {
            photoTime: '',
            photoImage: ''
          },
        jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: '',
        jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber: '',
        jnpf_zcgl_zcdj_warrant_jnpf_landUse: '',
        jnpf_zcgl_zcdj_warrant_jnpf_housePurpose: '',
        jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner: '',
        jnpf_zcgl_zcdj_warrant_jnpf_address: '',
        jnpf_zcgl_zcdj_warrant_jnpf_useNature: '',
        jnpf_zcgl_zcdj_warrant_jnpf_buildings: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_layers: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_numberFloors: 0,
        jnpf_zcgl_zcdj_warrant_jnpf_startTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_endTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime: '',
        jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation: '',
        jnpf_zcgl_zcdj_warrant_jnpf_notes: '',
        jnpf_zcgl_zcdj_warrant_jnpf_productionFile: [],
        jnpf_zcgl_zcdj_warrant_jnpf_productionImage: [],
        jnpf_zcgl_zcdj_area_jnpf_buildingArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedLandArea: '',
        jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea: '',
        jnpf_zcgl_zcdj_area_jnpf_landSurveyArea: '',
        jnpf_zcgl_zcdj_area_jnpf_exclusiveArea: '',
        jnpf_zcgl_zcdj_area_jnpf_sharedArea: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoTime: '',
        jnpf_zcgl_zcdj_photo_jnpf_photoImage: [],
      },
      tableRequiredData: {},
      activeremygj: '2',
      dataRule:
        {
          zcNumber: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          zcName: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          address: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            }
          ],
          zcNature: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          zcSource: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          affiliatedUnit: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          managementUnit: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],

          jnpf_zcgl_zcdj_warrant_jnpf_propertyRight: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          jnpf_zcgl_zcdj_photo_jnpf_photoTime: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            }
          ],
          jnpf_zcgl_zcdj_photo_jnpf_photoImage: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'click'
            }
          ]

        },
      zcNatureOptions: [],
      assetClassOptions: [],
      assetTypeOptions:[],
      zcStatusOptions: [],
      zcPurposeOptions: [],
      zcSourceOptions: [],
      holdingMethodOptions: [],
      affiliatedUnitOptions: [],
      managementUnitOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions: [],
      jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions: []
    }



  },
  computed: {
    // 获取名称显示
    provinceName() {
      const province = this.provinces.find(p => p.adcode === this.selectedProvince);
      this.dataForm.provinceName = province.name
      return province ? province.name : '';
    },
    cityName() {
      const city = this.cities.find(c => c.adcode === this.selectedCity);
      this.dataForm.cityName = city.name
      return city ? city.name : '';
    },
    districtName() {
      const district = this.districts.find(d => d.adcode === this.selectedDistrict);
      this.dataForm.districtName = district.name
      return district ? district.name : '';
    },
    streetName() {
      const street = this.streets.find(s => s.adcode === this.selectedStreet);
      this.dataForm.streetName = street.name
      return street ? street.name : '';
    },

    formOperates() {
      return this.setting.formOperates
    }
  },
  watch: {},
  created() {
    this.getwarrantTypeOptions()
    this.getzcNatureOptions()
    this.getzcStatus()
    this.getassetClassOptions()
    this.getzcPurposeOptions()
    this.getzcSourceOptions()
    this.getAssetTypeOptions()
    this.getholdingMethodOptions()
    this.getaffiliatedUnitOptions()
    this.getmanagementUnitOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions()
    this.getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions()
  },
  mounted() {
    this.loadProvinces();
  },
  methods: {
    // 加载省份数据
    loadProvinces() {

      const amapKey = 'fc48e1e74dfb98fbde22eaca6abcbf2d'; // 替换为你的高德API Key
      const url = `https://restapi.amap.com/v3/config/district?key=${amapKey}&keywords=中国&subdistrict=1&extensions=base`;

      axios.get(url)
        .then(response => {
          if (response.data.status === '1' && response.data.districts && response.data.districts.length) {
            this.provinces = response.data.districts[0].districts;
          } else {
            console.error('获取省份数据失败:', response.data.info);
            alert('获取省份数据失败，请检查API Key');
          }
        })
        .catch(error => {
          console.error('获取省份数据失败:', error);
          alert('获取省份数据失败，请稍后重试');
        });
    },

    // 省份选择变化
    onProvinceChange() {
      // 重置下级选择
      this.selectedCity = '';
      this.selectedDistrict = '';
      this.selectedStreet = '';
      this.districts = [];
      this.streets = [];

      if (!this.selectedProvince) return;

      // 加载城市数据
      this.loadingCity = true;
      this.loadCities(this.selectedProvince)
        .finally(() => {
          this.loadingCity = false;
        });
    },

    // 城市选择变化
    onCityChange() {
      // 重置下级选择
      this.selectedDistrict = '';
      this.selectedStreet = '';
      this.streets = [];

      if (!this.selectedCity) return;

      // 加载区县数据
      this.loadingDistrict = true;
      this.loadDistricts(this.selectedCity)
        .finally(() => {
          this.loadingDistrict = false;
        });
    },

    // 区县选择变化
    onDistrictChange() {
      // 重置下级选择
      this.selectedStreet = '';

      if (!this.selectedDistrict) return;

      // 加载街道数据
      this.loadingStreet = true;
      this.loadStreets(this.selectedDistrict)
        .finally(() => {
          this.loadingStreet = false;
        });
    },

    // 加载城市数据
    loadCities(adcode) {
      const amapKey = 'fc48e1e74dfb98fbde22eaca6abcbf2d'; // 替换为你的高德API Key
      const url = `https://restapi.amap.com/v3/config/district?key=${amapKey}&keywords=${adcode}&subdistrict=1&extensions=base`;

      return axios.get(url)
        .then(response => {
          if (response.data.status === '1' && response.data.districts && response.data.districts.length) {
            this.cities = response.data.districts[0].districts;
          } else {
            console.error('获取城市数据失败:', response.data.info);
            this.cities = [];
          }
        })
        .catch(error => {
          console.error('获取城市数据失败:', error);
          this.cities = [];
        });
    },

    // 加载区县数据
    loadDistricts(adcode) {
      const amapKey = 'fc48e1e74dfb98fbde22eaca6abcbf2d'; // 替换为你的高德API Key
      const url = `https://restapi.amap.com/v3/config/district?key=${amapKey}&keywords=${adcode}&subdistrict=1&extensions=base`;

      return axios.get(url)
        .then(response => {
          if (response.data.status === '1' && response.data.districts && response.data.districts.length) {
            this.districts = response.data.districts[0].districts;
          } else {
            console.error('获取区县数据失败:', response.data.info);
            this.districts = [];
          }
        })
        .catch(error => {
          console.error('获取区县数据失败:', error);
          this.districts = [];
        });
    },

    // 加载街道数据
    loadStreets(adcode) {
      const amapKey = 'fc48e1e74dfb98fbde22eaca6abcbf2d'; // 替换为你的高德API Key
      const url = `https://restapi.amap.com/v3/config/district?key=${amapKey}&keywords=${adcode}&subdistrict=1&extensions=base`;

      return axios.get(url)
        .then(response => {
          if (response.data.status === '1' && response.data.districts && response.data.districts.length) {
            this.streets = response.data.districts[0].districts;
          } else {
            console.error('获取街道数据失败:', response.data.info);
            this.streets = [];
          }
        })
        .catch(error => {
          console.error('获取街道数据失败:', error);
          this.streets = [];
        });
    },

    // 街道选择变化
    onStreetChange() {
      console.log('最终选择:', this.selectedProvince, this.selectedCity, this.selectedDistrict, this.selectedStreet);
    },

    // label: `${item.name} - ${item.district || ''} - ${item.address || ''}`,
    querySearch(queryString, cb) {
      this.keywords = queryString;
      this.autoInput();
      this.searchResults = this.searchResults
        .filter(item => item.location && item.name)
        .map(item => ({
          ...item,
          address: item.address || `${item.district || ''}${item.name || ''}`,
          fullText: item.address || `${item.district || ''}${item.name || ''}`,
          // 为了符合 el-autocomplete 的格式要求，添加 label 和 value 属性
          label: item.address || `${item.district || ''}${item.name || ''}`,
          value: item.address
        }));
      cb(this.searchResults);
    },
    getAssetTypeOptions() {
      getDictionaryDataSelector('610823865056100147').then(res => {
        this.assetTypeOptions = res.data.list
      })
    },
    getholdingMethodOptions() {
      getDictionaryDataSelector('610823865056100678').then(res => {
        this.holdingMethodOptions = res.data.list
      })
    },
    handleClick(){
      //获取资产评估
      if(this.active == 4){
        this.listLoading = true;
        let _query = {
          ...this.listQuery,
          ...this.query,
          keyword: this.keyword,
          dataType: 0,
          menuId: this.menuId,
          zcName:this.dataForm.zcName
        };
        request({
          url: `/api/example/ZcglZcrzZcpg/getList`,
          method: 'post',
          data: _query
        }).then(res => {
          var _list = [];
          for (let i = 0; i < res.data.list.length; i++) {
            let _data = res.data.list[i];
            _list.push(_data)
          }
          this.zcpglist = _list.map(o => ({
            ...o,
            ...this.expandObj
          }))
          this.total = res.data.pagination.total
          this.listLoading = false
        })

      if(this.active!=0){

        return
      }

      this.map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 11
      });


      // 添加地图点击事件监听器
      //   const lng =  this.dataForm.longitude;
      //   const lat = this.dataForm.latitude;
      // 添加地图点击事件监听器
      const lng = _dataAll.longitude;
      const lat = _dataAll.latitude;

      // 使用逆地理编码将坐标转换为地址
      const geocoder = new AMap.Geocoder({
        radius: 1000,
        extensions: 'all'
      });
      var srlf = this
      geocoder.getAddress([lng, lat], (status, result) => {
        if (status === 'complete' && result.info === 'OK') {
          const address = result.regeocode.formattedAddress;
          console.log('更新后的地址:', address);

          // 添加标记
          if (srlf.marker) {
            srlf.marker.setMap(null);
          }
          srlf.marker = new AMap.Marker({
            position: [lng, lat],
            map: srlf.map
          });
          // 定位到所选位置并设置地图视野
          srlf.map.setCenter([lng, lat]);
          srlf.map.setZoom(15);
        }
      });





      }
    },

    getwarrantTypeOptions() {
      getDictionaryDataSelector('610823865056100177').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_warrantTypeOptions = res.data.list
      })
    },
    getStatusTagType(status) {
      if (status === '0' || status === null || status === 10) return 'info'
      if (status === '20') return 'success'
      if (status === '30') return 'warning'
      return ''
    },
    getStatusText(status) {
      if (status === '0' || status === null || status === 10) return '未生效'
      if (status === '20') return '已生效'
      if (status === '30') return '已出租'
      return '未知状态'
    },
    // 获取选项标签
    getOptionLabel(options, value) {
      const item = options.find(opt => opt.enCode === value);
      return item ? item.fullName : '';
    },
    // 获取用户名称（需要根据实际用户选择组件实现调整）
    getUserName(userId) {
      // 示例逻辑，需根据实际用户数据源实现
      const user = this.userList.find(u => u.id === userId);
      return user ? user.name : '';
    },

    validateRequiredFields(dataForm, fields, content) {
      if (!dataForm[fields] || dataForm[fields] === '') {

        this.$message({
          message: `请填写${content}`,
          type: 'error',
          duration: 1000
        })
        return false
      }
    },

    nextS() {

      if (this.active-- < 1) this.active = 0
    },

    next() {
      //校验必填值
      if (this.active == 0) {
        if (this.validateRequiredFields(this.dataForm, 'zcName', '资产名称') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'address', '资产地址') == false) {
          return
        }
        // if (this.validateRequiredFields(this.dataForm, 'zcNature', '资产性质') == false) {
        //   return
        // }
        if (this.validateRequiredFields(this.dataForm, 'zcSource', '资产来源') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'affiliatedUnit', 'affiliatedUnit') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'managementUnit', '管理单位') == false) {
          return
        }
      }

      if (this.active == 1) {
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_propertyRight', '产权性质') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_startTime', '开始使用时间') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_warrant_jnpf_endTime', '结束使用时间') == false) {
          return
        }

      }

      if (this.active == 2) {
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_sharedLandArea', '证载共有土地面积') == false) {
          return
        }
        if (this.validateRequiredFields(this.dataForm, 'jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea', '建筑测量面积') == false) {
          return
        }


      }


      if (this.active++ > 2) this.active = 0
    },
    judgeShow(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return true
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return item.read
    },
    judgeWrite(id) {
      if (!this.setting.formOperates || !this.setting.formOperates.length) return false
      let arr = this.setting.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return true
      let item = arr[0]
      return !item.write
    },
    getzcStatus() {
      getDictionaryDataSelector('610000000000000000').then(res => {
        this.zcStatusOptions = res.data.list
      })
    },
    getassetClassOptions() {
      getDictionaryDataSelector('610000000000000001').then(res => {
        this.assetClassOptions = res.data.list
      })
    },
    getzcNatureOptions() {
      getDictionaryDataSelector('610823452110094661').then(res => {
        this.zcNatureOptions = res.data.list
      })
    },
    getzcPurposeOptions() {
      getDictionaryDataSelector('610823865056100677').then(res => {
        this.zcPurposeOptions = res.data.list
      })
    },
    getzcSourceOptions() {
      getDictionaryDataSelector('610823965094445381').then(res => {
        this.zcSourceOptions = res.data.list
      })
    },
    getaffiliatedUnitOptions() {
      getDictionaryDataSelector('610824055188095301').then(res => {
        this.affiliatedUnitOptions = res.data.list
      })
    },
    getmanagementUnitOptions() {
      getDictionaryDataSelector('610824142995849541').then(res => {
        this.managementUnitOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions() {
      getDictionaryDataSelector('610826202277478725').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightOptions = res.data.list
      })
    },
    getjnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions() {
      getDictionaryDataSelector('610826295164535109').then(res => {
        this.jnpf_zcgl_zcdj_warrant_jnpf_useNatureOptions = res.data.list
      })
    },
    goBack() {
      this.$emit('close')
    },
    init(data) {

      this.loading = true
      this.dataForm.id = data.id || ''
      this.setting.readonly = true
      this.visible = true
      // this.updateDataRule()
      this.$nextTick(() => {
        this.$refs['elForm'].resetFields()
        if (this.dataForm.id) {

          this.loading = true
          request({
            url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
            method: 'get'
          }).then(res => {
            this.dataInfo(res.data)
            this.loading = false

          })
        }
        this.$emit('setPageLoad')
      })
      this.$store.commit('generator/UPDATE_RELATION_DATA', {})
    },
    updateDataRule() {
      let newRules = {}
      for (let i = 0; i < this.setting.formOperates.length; i++) {
        const item = this.setting.formOperates[i]
        if (!item.id.includes('-')) {
          const newRulesItem = {
            required: item.required,
            message: item.name + '不能为空',
            trigger: item.trigger || 'blur'
          }
          if (!this.dataRule.hasOwnProperty(item.id)) {
            if (item.required) this.$set(newRules, item.id, [newRulesItem])
          } else {
            let withoutRequiredItem = true
            for (let i = 0; i < this.dataRule[item.id].length; i++) {
              if (this.dataRule[item.id][i].hasOwnProperty('required')) {
                this.dataRule[item.id][i].required = item.required
                withoutRequiredItem = false
              }
            }
            if (withoutRequiredItem && item.required) this.dataRule[item.id].push(newRulesItem)
          }
        } else {
          let key = item.id.split('-')[0]
          let newId = item.id.split('-')[1]
          let newItem = {
            ...item,
            id: newId
          }
          if (!this.tableRequiredData.hasOwnProperty(key)) {
            this.$set(this.tableRequiredData, key, [newItem])
          } else {
            this.tableRequiredData[key].push(newItem)
          }
        }
      }
      this.dataRule = {...this.dataRule, ...newRules}
    },
    exist() {
      let isOk = true
      for (let key in this.tableRequiredData) {
        if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
          for (let i = 0; i < this.dataForm[key].length; i++) {
            let item = this.dataForm[key][i]
            inner: for (let id in item) {
              let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
              if (!arr.length) continue inner
              if (arr[0].required) {
                let msg = `${arr[0].name}不能为空`
                let boo = true
                if (arr[0].dataType === 'array') {
                  boo = !this.jnpf.isEmptyArray(item[id])
                } else {
                  boo = !this.jnpf.isEmpty(item[id])
                }
                if (!boo) {
                  this.$message({
                    message: msg,
                    type: 'error',
                    duration: 1000
                  })
                  isOk = false
                  break
                }
              }
            }
          }
        }
      }
      return isOk
    },
    judgeRequired(id) {
      if (!this.formOperates || !this.formOperates.length) return false
      let arr = this.formOperates.filter(o => o.id === id) || []
      if (!arr.length) return false
      let item = arr[0]
      return item.required
    },
    // 表单提交
    dataFormSubmit(eventType, flowUrgent) {
      this.$refs['elForm'].validate((valid) => {
        if (valid) {
          if (this.exist && !this.exist()) return
          if (eventType === 'audit' || eventType === 'reject') {
            this.$emit('eventReceiver', this.dataForm, eventType)
            return
          }
          this.dataForm.status = eventType === 'submit' ? 0 : 1
          this.dataForm.flowId = this.setting.flowId
          this.dataForm.flowUrgent = flowUrgent
          this.eventType = eventType
          if (this.eventType === 'submit') {
            this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
              type: 'warning'
            }).then(() => {
              this.request()
            }).catch(() => {
            })
          } else {
            this.request()
          }
        }
      })
    },
    request() {
      var _data = this.dataList()
      if (!this.dataForm.id) {
        request({
          url: '/api/example/ZcglZcdjInfo',
          method: 'post',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      } else {
        request({
          url: '/api/example/ZcglZcdjInfo/' + this.dataForm.id,
          method: 'PUT',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              this.visible = false
              this.$emit('close', true)
            }
          })
        })
      }
    },

    openSelectDialog(key) {
      this.currTableConf = this.addTableConf[key]
      this.currVmodel = key
      this.selectDialogVisible = true
      this.$nextTick(() => {
        this.$refs.selectDialog.init()
      })
    },
    addForSelect(data) {
      for (let i = 0; i < data.length; i++) {
        let item = {...this.tableRows[this.currVmodel], ...data[i]}
        this.dataForm[this.currVmodel].push(item)
      }
    },
    dataList() {
      var _data = JSON.parse(JSON.stringify(this.dataForm))

      _data.zcFmImage = JSON.stringify(_data.zcFmImage)

      _data.zcFile = JSON.stringify(_data.zcFile)

      _data.zcgl_zcdj_warrant.propertyRight = _data.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight
      _data.zcgl_zcdj_warrant.warrantNumber = _data.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber
      _data.zcgl_zcdj_warrant.landUse = _data.jnpf_zcgl_zcdj_warrant_jnpf_landUse
      _data.zcgl_zcdj_warrant.housePurpose = _data.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose
      _data.zcgl_zcdj_warrant.zzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner
      _data.zcgl_zcdj_warrant.xzPropertyOwner = _data.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner
      _data.zcgl_zcdj_warrant.address = _data.jnpf_zcgl_zcdj_warrant_jnpf_address
      _data.zcgl_zcdj_warrant.useNature = _data.jnpf_zcgl_zcdj_warrant_jnpf_useNature
      _data.zcgl_zcdj_warrant.buildings = _data.jnpf_zcgl_zcdj_warrant_jnpf_buildings
      _data.zcgl_zcdj_warrant.layers = _data.jnpf_zcgl_zcdj_warrant_jnpf_layers
      _data.zcgl_zcdj_warrant.numberFloors = _data.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors
      _data.zcgl_zcdj_warrant.startTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_startTime
      _data.zcgl_zcdj_warrant.endTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_endTime
      _data.zcgl_zcdj_warrant.issuanceTime = _data.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime
      _data.zcgl_zcdj_warrant.custodyLocation = _data.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation
      _data.zcgl_zcdj_warrant.notes = _data.jnpf_zcgl_zcdj_warrant_jnpf_notes
      _data.zcgl_zcdj_warrant.productionFile = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionFile)
      _data.zcgl_zcdj_warrant.productionImage = JSON.stringify(_data.jnpf_zcgl_zcdj_warrant_jnpf_productionImage)
      _data.zcgl_zcdj_warrant.propertyRightDescribe = _data.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe
      _data.zcgl_zcdj_warrant.warrantStyleDescribe = _data.jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe
      _data.zcgl_zcdj_warrant.warrantType = _data.jnpf_zcgl_zcdj_warrant_jnpf_warrantType




      _data.zcgl_zcdj_area.buildingArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingArea
      _data.zcgl_zcdj_area.landArea = _data.jnpf_zcgl_zcdj_area_jnpf_landArea
      _data.zcgl_zcdj_area.sharedLandArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea
      _data.zcgl_zcdj_area.buildingMeasurementArea = _data.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea
      _data.zcgl_zcdj_area.landSurveyArea = _data.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea
      _data.zcgl_zcdj_area.exclusiveArea = _data.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea
      _data.zcgl_zcdj_area.sharedArea = _data.jnpf_zcgl_zcdj_area_jnpf_sharedArea
      _data.zcgl_zcdj_photo.photoTime = _data.jnpf_zcgl_zcdj_photo_jnpf_photoTime
      _data.zcgl_zcdj_photo.photoImage = JSON.stringify(_data.jnpf_zcgl_zcdj_photo_jnpf_photoImage)
      return _data
    },
    dataInfo(dataAll) {
      let _dataAll = dataAll
      // _dataAll.zcFmImage = JSON.parse(_dataAll.zcFmImage)
      _dataAll.zcFile = JSON.parse(_dataAll.zcFile)
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_propertyRight = _dataAll.zcgl_zcdj_warrant.propertyRight
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_warrantNumber = _dataAll.zcgl_zcdj_warrant.warrantNumber
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_landUse = _dataAll.zcgl_zcdj_warrant.landUse
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_housePurpose = _dataAll.zcgl_zcdj_warrant.housePurpose
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_zzPropertyOwner = _dataAll.zcgl_zcdj_warrant.zzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_xzPropertyOwner = _dataAll.zcgl_zcdj_warrant.xzPropertyOwner
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_address = _dataAll.zcgl_zcdj_warrant.address
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_useNature = _dataAll.zcgl_zcdj_warrant.useNature
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_buildings = _dataAll.zcgl_zcdj_warrant.buildings
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_layers = _dataAll.zcgl_zcdj_warrant.layers
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_numberFloors = _dataAll.zcgl_zcdj_warrant.numberFloors
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_startTime = _dataAll.zcgl_zcdj_warrant.startTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_endTime = _dataAll.zcgl_zcdj_warrant.endTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_issuanceTime = _dataAll.zcgl_zcdj_warrant.issuanceTime
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_custodyLocation = _dataAll.zcgl_zcdj_warrant.custodyLocation
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_notes = _dataAll.zcgl_zcdj_warrant.notes

      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_propertyRightDescribe = _dataAll.zcgl_zcdj_warrant.propertyRightDescribe
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_warrantStyleDescribe = _dataAll.zcgl_zcdj_warrant.warrantStyleDescribe
      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_warrantType = _dataAll.zcgl_zcdj_warrant.warrantType



      _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionFile = _dataAll.zcgl_zcdj_warrant.productionFile ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionFile) : []
      // _dataAll.jnpf_zcgl_zcdj_warrant_jnpf_productionImage = _dataAll.zcgl_zcdj_warrant.productionImage ? JSON.parse(_dataAll.zcgl_zcdj_warrant.productionImage) : []
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingArea = _dataAll.zcgl_zcdj_area.buildingArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landArea = _dataAll.zcgl_zcdj_area.landArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedLandArea = _dataAll.zcgl_zcdj_area.sharedLandArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_buildingMeasurementArea = _dataAll.zcgl_zcdj_area.buildingMeasurementArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_landSurveyArea = _dataAll.zcgl_zcdj_area.landSurveyArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_exclusiveArea = _dataAll.zcgl_zcdj_area.exclusiveArea
      _dataAll.jnpf_zcgl_zcdj_area_jnpf_sharedArea = _dataAll.zcgl_zcdj_area.sharedArea



      if(_dataAll.zcgl_zcdj_photo!=null){
        _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoTime = _dataAll.zcgl_zcdj_photo.photoTime



        _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = _dataAll.zcgl_zcdj_photo.photoImage ? JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage) : []


      }


      this.provinceName =   _dataAll.provinceName
      this.cityName =   _dataAll.cityName
      this.districtName =   _dataAll.districtName
      this.streetName =   _dataAll.streetName




      // _dataAll.jnpf_zcgl_zcdj_photo_jnpf_photoImage = JSON.parse(_dataAll.zcgl_zcdj_photo.photoImage)

      this.map = new AMap.Map('container', {
        resizeEnable: true,
        zoom: 11
      });
      this.autoCompleteDom = new AMap.Autocomplete({
        city: '全国'
      });

      // 添加地图点击事件监听器
        const lng = _dataAll.longitude;
        const lat = _dataAll.latitude;


        // 使用逆地理编码将坐标转换为地址
        const geocoder = new AMap.Geocoder({
          radius: 1000,
          extensions: 'all'
        });
        geocoder.getAddress([lng, lat], (status, result) => {
          if (status === 'complete' && result.info === 'OK') {
            const address = result.regeocode.formattedAddress;
            console.log('更新后的地址:', address);

            // 添加标记
            if (this.marker) {
              this.marker.setMap(null);
            }
            this.marker = new AMap.Marker({
              position: [lng, lat],
              map: this.map
            });

            // 定位到所选位置并设置地图视野
            this.map.setCenter([lng, lat]);
            this.map.setZoom(15);
          }
        });


      this.dataForm = _dataAll
    }
  }
}

</script>
<style>
#container {
  width:98%;
  margin-left: 20px;
  height: 400px;
}
body {
  background: white;

}

.el-textarea.is-disabled .el-textarea__inner {

  color: black !important;
}

.el-input.is-disabled .el-input__inner {
  color: black !important;

}

.fixed-bottom {
  z-index: 100;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  display: flex;
  justify-content: flex-end; /* 按钮靠右对齐 */
  padding: 10px;
  border-top: 1px solid #ccc; /* 可选：添加分割线 */
}

.confirm-button {
  margin-left: 20px;
  padding: 10px 20px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.confirm-button:hover {
  background-color: #0056b3;
}

/deep/ .el-input__inner {
  background: white !important;

}

/deep/ .el-textarea__inner {
  background: white !important;
}




#app {
  font-family: Noto Sans SC;
  font-style: normal;
  font-weight: 400;
  color: black;
}



/* 地图 */
.address-selector {
  max-width: 600px;
  /*margin: 11px auto;*/
  padding: 5px;
  background-color: #f8f9fa;
  border-radius:3px;
  margin-left: 10px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.select-wrapper {
  flex: 1 1 120px;
}

select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

select:hover {
  border-color: #bbb;
}

select:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.result {
  margin-top: 2px;
  padding: 15px;
  background-color: #e8f3ff;
  border-radius: 4px;
  font-size: 14px;
}

.loading {
  color: #999;
  font-size: 13px;
  margin-top: 5px;
}

h3 {
  text-align: center;
  color: #333;
  margin-bottom: 25px;
}
</style>
